package com.yyt.yytojbackendjudgeservice.judge.codesandbox;


import com.yyt.yytojbackendmodel.model.codesandbox.ExecuteCodeRequest;
import com.yyt.yytojbackendmodel.model.codesandbox.ExecuteCodeResponce;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@AllArgsConstructor
public class CodeSandboxProxy implements CodeSandbox{

    private CodeSandbox codeSandbox;

    @Override
    public ExecuteCodeResponce executeCode(ExecuteCodeRequest executeCodeRequest) {
        log.info("代码沙箱调用前："+executeCodeRequest.toString());
        ExecuteCodeResponce executeCodeResponce = codeSandbox.executeCode(executeCodeRequest);
        log.info("代码沙箱调用后："+executeCodeResponce.toString());
        return executeCodeResponce;
    }
}
